package com.hxk.controller;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hxk.pojo.User;
/**
 * springboot异常处理方式五
 * 使用配置实现HandlerExceptionResolver接口实现
 * @author Cactus
 */
@Controller
public class DemoController4 {

	@RequestMapping("/ex3")
	public String ex3() throws FileNotFoundException {
		new FileInputStream(new File("e:/a.txt"));
		return "index";
	}
	
	@RequestMapping("/ex4")
	public String ex4() throws CloneNotSupportedException {
		User user = new User();
		user.clone();
		return "index";
	}
}
